/**
 * Created with Intellij IDEA.
 * Description;
 * User:墨琦
 * Data:2023-03-01
 * Time:14:49
 */

class Person{
    private String name;
    private String sex;
    private int age;
    public Person()
    {
    }
    public Person(String name,String sex,int age)
    {
        this.age=age;
        this.name=name;
        this.sex=sex;
    }

    public String getName() {
        return name;
    }

    public String getSex() {
        return sex;
    }

    public int getAge() {
        return age;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public void setAge(int age) {
        this.age = age;
    }
    public void show()
    {
        System.out.println("姓名："+this.name+"性别："+this.sex+"年龄："+this.age);
    }
    public String showInfo()
    {
        StringBuffer fw=new StringBuffer();
        fw.append("姓名:").append(this.name).append("\n性别：").append(this.sex).append("\n年龄").append(this.age);
        return fw.toString();
    }
}

public class Text1 {
    public static void main(String[] args) {
       Employee fw=new Employee("汤琦","男",22,"财务部","经理");
        String ma=fw.showInfo();
        System.out.println(ma);
    }
}